<script>
function search()
  {
  key=document.getElementById('key').value;
  window.location.assign("search.php?key="+key)
  }
</script>
		<div id="top-bar-left">
		<a href="index.php" ><img src="../images/logo.png"></a>
		</div>
		<div id="search">
			<input type="text"  name="key" id="key" class="txt_w300_h25" value="" placeholder="Tìm kiếm sản phẩm..."/>
			<input type="submit"  name="btn_submit_tk" value="Tìm kiếm" class="btn_w80_h29" onclick ='search();'/>
		</div>
		<div id="top-bar-right">
		<ul class="dropmenu-top-right">
			<?php
			$ok=1;
			if(isset($_SESSION['cart']))
			{
				foreach($_SESSION['cart'] as $k=>$v)
				{
					if(isset($v))
					{
						$ok=2;
					}
				}
			}
			if ($ok != 2)
			{
				$img= '<div class="img"><a href="#"><img src="../images/cart.gif" title="Giỏ hàng của bạn" ></img></a><p></p></div>';
			} else {
				$items = $_SESSION['cart'];
				$img= '<li class="img"><a href="cart.php"><img src="../images/cart.gif" title="Giỏ hàng của bạn"><p>:'.count($items).'</p></img></a></li>';
			}
				if(isset($_SESSION["session_customer_id"])){
					echo	"<li id='top-bar-right-img'>".$img."</li>";
					echo "<li class='li-lv1'><a href='customer.php'>".$_SESSION["session_customer_email"]."</a>";
						echo "</li>";
					echo "<li class='li-lv1'><a href= 'logout.php'>Thoát</a></li>";
				}else{
					echo	"<li id='top-bar-right-img'>".$img."</li>";
					echo 	"<li class='li-lv1'><a href='login.php'>Đăng nhập</a></li>";
					echo	"<li class='li-lv1'>||<a href='register.php'>Đăng ký</a></li>";	
				}
			?>
		</ul>
		</div>